#! /bin/sh
tar zxvf onig-5.9.1.tar.gz
patch onig-5.9.1/regenc.h < ./patch/regenc.h.patch 

cd ./onig-5.9.1
./configure
 make

cd ./src
gcc -Wall -fPIC -O2 -I../onig-5.9.1 -c onigvw.c ptrreg.c
gcc -dynamiclib -Wl -o libonigvw.dylib onigvw.o ../onig-5.9.1/.libs/libonig.a ptrreg.o
